
include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/pam_plugin )

protoc_cpp(PROTO_SRCS PROTO_HDRS ${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/srp_auth.proto)

add_executable(net_test net_test.cpp 
                        ${PROJECT_SOURCE_DIR}/pam_plugin/pam_srp_net.cpp 
                        ${PROJECT_SOURCE_DIR}/pam_plugin/srp.c 
                        ${PROJECT_SOURCE_DIR}/pam_plugin/pam_srp_settings.cpp 
                        ${PROJECT_SOURCE_DIR}/pam_plugin/pam_srp.cpp 
                        ${PROJECT_SOURCE_DIR}/pam_plugin/pam_srp_cache.cpp 
                        ${PROTO_SRCS} )

target_link_libraries(net_test boost_system ssl pthread pam sqlite3 ${PROTOBUF_LIBRARY})

add_executable(pam_test pam_test.cpp)
target_link_libraries(pam_test pam pam_misc pthread)